package com.joshondesign.sdljava.gfx;

import com.joshondesign.sdljava.SDL;
import com.joshondesign.sdljava.SDL_Surface;

import java.io.File;

import static com.joshondesign.sdljava.SDLUtil.p;

public class SImage {
    SDL_Surface _sdlimage;

    public SImage(File file) {
    //load image
        p("trying to load image file: " + file.getAbsolutePath());
        p("exists = " + file.exists());
        SDL_Surface image = SDL.IMG_Load(file.getAbsolutePath());
        this._sdlimage = image;
    }

    public int getWidth() {
        return _sdlimage.getW();
    }

    public int getHeight() {
        return _sdlimage.getH();
    }

    public Object getNative() {
        return _sdlimage;
    }
}
